<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateThumbnailsTable extends Migration
{

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('thumbnails', function (Blueprint $table)
		{
			$table->engine = 'InnoDB';

			$table->increments('id');

			// 图片。
			$table->char('file_hash', 32);

			// 缩略图。
			$table->char('storage_hash', 32);

			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('thumbnails');
	}
}
